package com.donn.securitycontrolplatform.alarmdetail.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.donn.securitycontrolplatform.alarmdetail.AlarmDetail;
import com.donn.securitycontrolplatform.alarmdetail.service.IAlarmDetailService;
import com.donn.securitycontrolplatform.db1.mapper.TAlarmDetailMapper;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zhenglx
 * @since 2022-06-19
 */
@Service
public class AlarmDetailServiceImpl extends ServiceImpl<TAlarmDetailMapper, AlarmDetail> implements IAlarmDetailService {

    @Override
    public AlarmDetail getByAlarmType(Long alarmType) {
        QueryWrapper<AlarmDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq(AlarmDetail.ALARM_TYPE, alarmType);
        return getOne(queryWrapper);
    }
}
